﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="userinfo.aspx.cs" Inherits="OF.Web.admin.userinfo" %>

<%@ Register Assembly="OF.Controls" Namespace="OF.Controls" TagPrefix="cc1" %>
<%@ Register Src="~/admin/controls/head.ascx" TagPrefix="uc1" TagName="head" %>
<%@ Register Src="~/admin/controls/footer.ascx" TagPrefix="uc1" TagName="footer" %>
<%@ Register Src="~/admin/controls/menu.ascx" TagPrefix="uc1" TagName="menu" %>

<!DOCTYPE HTML>
<html>
<head>
    <title>商户资料</title>
    <meta charset="gbk">
    <link href="res/css/main.css" rel="stylesheet">
    <link href="res/css/public.css" rel="stylesheet">

    <link href="res/css/table.css" rel="stylesheet">
    <script type="text/javascript" src="res/js/jquery-1.8.0.min.js"></script>
</head>
<body>

    <form id="Form1" runat="server">
        <uc1:head runat="server" ID="head" />

        <div id="page">
            <div class="clearfix" id="content">
                <div class="col-main">
                    <div class="main-wrap">
                        <div class="division">
                            <table>
                                <tr>
                                    <td>店铺名称:</td>
                                    <td>
                                        <cc1:OFTextBox ID="txtshopname" runat="server" CssClass="ipt ipt-210" MaxLength="30" CanBeNull="必填"></cc1:OFTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>商家类型:</td>
                                    <td>
                                        <cc1:OFDropDownList ID="ddlShoptype" runat="server" CssClass="radiobuttonlist">
                                          
                                        </cc1:OFDropDownList>
                                    </td>
                                </tr>
                                 <tr>
                                    <td>当前状态:</td>
                                    <td>
                                         <asp:RadioButtonList ID="rblState" runat="server" RepeatDirection="Horizontal">
                                            <asp:ListItem Value="1" Selected="True">营业中</asp:ListItem>
                                            <asp:ListItem Value="2" >关闭店铺</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>店铺地址:</td>
                                    <td>
                                        <cc1:OFTextBox ID="txtaddress" runat="server" CssClass="ipt ipt-210" MaxLength="100" CanBeNull="必填"></cc1:OFTextBox></td>
                                </tr>
                                <tr>
                                    <td>联系电话:</td>
                                    <td>
                                        <cc1:OFTextBox ID="txtphone" runat="server" CssClass="ipt ipt-150" MaxLength="15" CanBeNull="必填" RequiredFieldType="移动手机"></cc1:OFTextBox></td>
                                </tr>
                                <tr>
                                    <td>人均消费:</td>
                                    <td>
                                        <cc1:OFTextBox ID="txtspend" runat="server" CssClass="ipt ipt-60" RequiredFieldType="数据校验"></cc1:OFTextBox>(元)</td>
                                </tr>
                                <tr>
                                    <td>外卖/点餐:</td>
                                    <td>
                                        <asp:RadioButtonList ID="rblType" runat="server" RepeatDirection="Horizontal">
                                            <asp:ListItem Value="1" Selected="True">外卖店</asp:ListItem>
                                            <asp:ListItem Value="2">点餐店</asp:ListItem>
                                            <asp:ListItem Value="3">外卖+点餐</asp:ListItem>
                                            <asp:ListItem Value="0" >不开通</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                                 <tr>
                                    <td>是否开通网上点餐:</td>
                                    <td>
                                        <asp:RadioButtonList ID="rblIsonline" runat="server" RepeatDirection="Horizontal">
                                            <asp:ListItem Value="1" >开通</asp:ListItem>
                                            <asp:ListItem Value="0" >不开通</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>送餐时间:</td>
                                    <td>早:<asp:DropDownList ID="ddl1" runat="server">
                                        <asp:ListItem Value="-1">--</asp:ListItem>
                                        <asp:ListItem>0</asp:ListItem>
                                        <asp:ListItem>1</asp:ListItem>
                                        <asp:ListItem>2</asp:ListItem>
                                        <asp:ListItem>3</asp:ListItem>
                                        <asp:ListItem>4</asp:ListItem>
                                        <asp:ListItem>5</asp:ListItem>
                                        <asp:ListItem>6</asp:ListItem>
                                        <asp:ListItem>7</asp:ListItem>
                                        <asp:ListItem>8</asp:ListItem>
                                        <asp:ListItem>9</asp:ListItem>
                                    </asp:DropDownList>-
                                        <asp:DropDownList ID="ddl2" runat="server">
                                            <asp:ListItem Value="-1">--</asp:ListItem>
                                            <asp:ListItem>0</asp:ListItem>
                                            <asp:ListItem>1</asp:ListItem>
                                            <asp:ListItem>2</asp:ListItem>
                                            <asp:ListItem>3</asp:ListItem>
                                            <asp:ListItem>4</asp:ListItem>
                                            <asp:ListItem>5</asp:ListItem>
                                            <asp:ListItem>6</asp:ListItem>
                                            <asp:ListItem>7</asp:ListItem>
                                            <asp:ListItem>8</asp:ListItem>
                                            <asp:ListItem>9</asp:ListItem>
                                        </asp:DropDownList>
                                        &nbsp;&nbsp;&nbsp;中:<asp:DropDownList ID="ddl3" runat="server">
                                            <asp:ListItem Value="-1">--</asp:ListItem>
                                            <asp:ListItem>10</asp:ListItem>
                                            <asp:ListItem>11</asp:ListItem>
                                            <asp:ListItem>12</asp:ListItem>
                                            <asp:ListItem>13</asp:ListItem>
                                            <asp:ListItem>14</asp:ListItem>
                                            <asp:ListItem>15</asp:ListItem>
                                            <asp:ListItem>16</asp:ListItem>
                                        </asp:DropDownList>-
                                        <asp:DropDownList ID="ddl4" runat="server">
                                            <asp:ListItem Value="-1">--</asp:ListItem>
                                            <asp:ListItem>10</asp:ListItem>
                                            <asp:ListItem>11</asp:ListItem>
                                            <asp:ListItem>12</asp:ListItem>
                                            <asp:ListItem>13</asp:ListItem>
                                            <asp:ListItem>14</asp:ListItem>
                                            <asp:ListItem>15</asp:ListItem>
                                            <asp:ListItem>16</asp:ListItem>
                                        </asp:DropDownList>
                                        &nbsp;&nbsp;&nbsp;晚:<asp:DropDownList ID="ddl5" runat="server">
                                            <asp:ListItem Value="-1">--</asp:ListItem>
                                            <asp:ListItem>17</asp:ListItem>
                                            <asp:ListItem>18</asp:ListItem>
                                            <asp:ListItem>19</asp:ListItem>
                                            <asp:ListItem>20</asp:ListItem>
                                            <asp:ListItem>21</asp:ListItem>
                                            <asp:ListItem>22</asp:ListItem>
                                            <asp:ListItem>23</asp:ListItem>
                                            <asp:ListItem>24</asp:ListItem>
                                        </asp:DropDownList>-
                                        <asp:DropDownList ID="ddl6" runat="server">
                                            <asp:ListItem Value="-1">--</asp:ListItem>
                                            <asp:ListItem>17</asp:ListItem>
                                            <asp:ListItem>18</asp:ListItem>
                                            <asp:ListItem>19</asp:ListItem>
                                            <asp:ListItem>20</asp:ListItem>
                                            <asp:ListItem>21</asp:ListItem>
                                            <asp:ListItem>22</asp:ListItem>
                                            <asp:ListItem>23</asp:ListItem>
                                            <asp:ListItem>24</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>起送金额:</td>
                                    <td>
                                        <cc1:OFTextBox ID="txtfloorprice" runat="server" CssClass="ipt ipt-60" MaxLength="100"></cc1:OFTextBox>(元)
                                    </td>
                                </tr>
                                <tr>
                                    <td>配送费用:</td>
                                    <td>
                                        <cc1:OFTextBox ID="txttip" runat="server" CssClass="ipt ipt-60" RequiredFieldType="数据校验"></cc1:OFTextBox>(元)
                                    </td>
                                </tr>
                                <tr>
                                    <td>送餐预计时间:</td>
                                    <td>
                                        <cc1:OFTextBox ID="txtarrivtime" runat="server" CssClass="ipt ipt-60" MaxLength="3" RequiredFieldType="数据校验"></cc1:OFTextBox>(分钟)
                                    </td>
                                </tr>

                                <tr>
                                    <td>外卖配送学校:</td>
                                    <td colspan="3">
                                        <asp:Repeater ID="rptList" runat="server">
                                            <ItemTemplate>
                                                <label class="checkbox inline">
                                                    <asp:CheckBox ID="chbSel" runat="server" ValidationGroup='<%#Eval("id") %>' />
                                                    <%#Eval("shcoolname")%>
                                                </label>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                        <asp:HiddenField ID="hfSchools" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>商家图片:</td>
                                    <td colspan="3">
                                        <asp:Image ID="imglitpic" ImageUrl="res/image/nopic.png" runat="server" Width="100px" Height="100px" />
                                        <asp:HiddenField ID="hfPicName" runat="server" />
                                        <asp:FileUpload ID="fileUpLogo" runat="server" />
                                        <asp:Button ID="btnPicSure" runat="server" CssClass="rz-deep-btn" Text="确认上传" OnClick="btnPicSure_Click" ValidationGroup="btnup" />
                                        <asp:Label ID="lblShow" runat="server" Text="" CssClass="red"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>店铺介绍:</td>
                                    <td colspan="3">
                                        <cc1:OFTextBox ID="txtfeature" runat="server" CssClass="ipt ipt-150" TextMode="MultiLine" MaxLength="50" Height="50px" Width="600px"></cc1:OFTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:HiddenField ID="hfid" runat="server" />
                                        <asp:Button ID="btnSave" CssClass="rz-deep-btn" runat="server" Text="完善资料" OnClick="btnSave_Click" />
                                    </td>

                                </tr>
                            </table>
                        </div>
                    </div>
                </div>
                <uc1:menu runat="server" ID="menu" />
            </div>
        </div>
        <uc1:footer runat="server" ID="footer" />
<script type="text/javascript">
    $(document).ready(function () {

        $('#ddl1').change(function () {
            check();
        });
        $('#ddl2').change(function () {
            check();
        });
        $('#ddl3').change(function () {
            check();
        });
        $('#ddl4').change(function () {
            check();
        });
        $('#ddl5').change(function () {
            check();
        });
        $('#ddl6').change(function () {
            check();
        });
    })

    function check() {
        var type = $('input:radio[name="rblType"]:checked').val();
        if (type == null) {
            alert("请选择支持外卖的类型!");
            return false;
        }
        var current = $(this).children('option:selected').val();//这就是selected的值 
        if (current != "-1" && (type == "2" || type == "4")) {
            alert("请选择支持外卖的类型");
            return false;
        }
    }

</script>
    </form>
</body>
</html>
